package io;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;

public class PWDemo2 {
    public static void main(String[] args) throws IOException {
        Scanner scan= new Scanner(System.in);
        PrintWriter pw=new PrintWriter("book.txt");
        while (true){
            System.out.println("start");
            String str= scan.next();
            if ("exit".equals(str)){
                System.out.println("edd");
                break;
            }
            pw.write(str);
            pw.flush();
        }
        pw.close();
    }
}
